import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import router from './router/index.js'
import errorHandler from './utils/errorHandler.js'
import './assets/styles/index.scss'
import './assets/styles/mobile.scss'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
// 使用专门的错误处理工具
app.config.errorHandler = errorHandler.handleVueError

app.use(ElementPlus)
app.use(router)
app.mount('#app')
